<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::group(['middleware' => ['wx.auth','reg_wechat_member'] ], function () {
    Route::get('/','IndexController@index')->name('home');
    Route::post('/order','IndexController@save_order')->name('order');
    Route::get('/order/detail','IndexController@order_detail')->name('order_detail');

    Route::get('/vcode','IndexController@vcode')->name('vcode');

    //正式支付
    Route::get('/order/pay','IndexController@pay')->name('pay');
    //测试支付
//    Route::any('/pay', 'IndexController@makeTestPay')->name('pay');         //测试版微信支付

    Route::any('/cancel_order', 'IndexController@cancel_order')->name('cancel_order');


    Route::get('/driver','DriverController@index')->name('driver');
    Route::any('/driver/reg','DriverController@reg')->name('driver.reg');
    Route::any('/driver/end_trip','DriverController@end_trip')->name('driver.end_trip');

    Route::any('/test','IndexController@test');

});

Route::any('/order/pay_callback','IndexController@pay_callback')->name('pay_callback');


